package com.belf.console.domain.entity;

/**
 * 字段大小写处理方式
 */
public enum FieldCase {
    ORIGINAL("original"), // Original string form
    UPPERCASE("uppercase"), // Convert to uppercase
    LOWERCASE("lowercase"); // Convert to lowercase

    private final String value;

    FieldCase(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static FieldCase getFieldCase(String value) {
        for (FieldCase fieldCase : FieldCase.values()) {
            if (fieldCase.getValue().equalsIgnoreCase(value)) {
                return fieldCase;
            }
        }
        return ORIGINAL;
    }
}
